<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Not Find</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!--<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8, user-scalable=no" />-->
    <meta content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=no, width=device-width" name="viewport">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link href="/static/css/404.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/static/js/jquery.min.js" charset="utf-8"></script>
    <script type="text/javascript">
        $(function() {
            //判断是否是手机，如果是则显示手机报错页
            if(isMobile()){
                let new_element = document.createElement('link');
                new_element.setAttribute('rel', 'stylesheet');
                new_element.setAttribute('href', '/mui/css/mui.min.css');
                document.body.appendChild(new_element);
                document.querySelector(".mianBox").style.display = "none";
                document.querySelector(".show").style.display = "block";
                return false;
            }
            var h = $(window).height();
            $('body').height(h);
            $('.mianBox').height(h);
            centerWindow(".tipInfo");
        });
        //2.将盒子方法放入这个方，方便法统一调用
        function centerWindow(a) {
            center(a);
            //自适应窗口
            $(window).bind('scroll resize',
                function() {
                    center(a);
                });
        }
        //1.居中方法，传入需要剧中的标签
        function center(a) {
            var wWidth = $(window).width();
            var wHeight = $(window).height();
            var boxWidth = $(a).width();
            var boxHeight = $(a).height();
            var scrollTop = $(window).scrollTop();
            var scrollLeft = $(window).scrollLeft();
            var top = scrollTop + (wHeight - boxHeight) / 2;
            var left = scrollLeft + (wWidth - boxWidth) / 2;
            $(a).css({
                "top": top,
                "left": left
            });
        }
        /**是否是移动端*/
        function isMobile() {
            var userAgentInfo = navigator.userAgent;
            var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
            var flag = false;
            for (var v = 0; v < Agents.length; v++) {
                if (userAgentInfo.indexOf(Agents[v]) > 0) {
                    flag = true;
                    break;
                }
            }
            return flag;
        }
    </script>
</head>
<body>
    <!-- PC -->
    <div class="mianBox">
        <img src="/error/image/yun0.png" alt="" class="yun yun0" />
        <img src="/error/image/yun1.png" alt="" class="yun yun1" />
        <img src="/error/image/yun2.png" alt="" class="yun yun2" />
        <img src="/error/image/bird.png" alt="" class="bird" />
        <img src="/error/image/san.png" alt="" class="san" />
        <div class="tipInfo">
            <div class="in">
                <div class="textThis">
                    <h2 style="text-align: center">您访问的页面不存在噢</h2>
                    <p>
                        <span><a id="href" href="JavaScript:;" data-url="/">返回首页</a></span>
<!--                        <span>等待<b id="wait">6</b>秒</span>-->
                    </p>
                </div>
            </div>
        </div>
    </div>
    <!-- 移动 -->
    <div class="show" style="display: none;">
        <div class="show-body">
            <div class="img"><span class="mui-icon mui-icon-help-filled"></span></div>
            <div class="content font-bold">您访问的页面不存在噢</div>
            <div class="back"><a href="/">返回首页</a></div>
        </div>
    </div>
    <script type="text/javascript">
        (function() {
            if (window.frames.length != parent.frames.length) { //iframe中打开
                $("#href").html("我知道了")
            }
            $("#href").click(function () {
                if (window.frames.length == parent.frames.length) {
                    window.location.href = $(this).attr("data-url")
                }
            })
            // var wait = document.getElementById('wait'), href = document.getElementById('href').href;
            // var interval = setInterval(function() {
            //     var time = --wait.innerHTML;
            //     if (time <= 0) {
            //         clearInterval(interval);
            //         //location.href = href;
            //         alert("开始跳转提示");
            //     }
            // }, 1000);
        })();
    </script>
</body>
</html>
